package com.yjc.drygoods.ware.feign;

import com.yjc.common.to.PurchaseDetailTo;
import com.yjc.common.utils.R;
import com.yjc.drygoods.ware.entity.PurchaseDetailEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author yjc
 * @create 2022-11-10 11:04
 */
@FeignClient("drygoods-search")
public interface SearchFeignService {
    @GetMapping("/search/oldyear/month/avg/purchase/spunum")
    public R searchPurchaseSpuNum(@RequestParam("spuId") Long spuId);

    @PostMapping("/search/save/oldYear/purchaseDetail")
    public R saveOldYearPurchaseDetail(@RequestBody List<PurchaseDetailEntity> purchaseDetailTos);
}
